home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
doraemon_fishing.swf
/
scripts
/
DefineSprite_5_bubble
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-01-13
|
847b
|
43 lines
function randomNum(num)
{
rndNum = Math.floor(Math.random() * num);
return rndNum;
}
function bubble()
{
if(_Y > -128)
{
if(this._alpha < ThisSize * 0.8)
{
this._alpha += 5;
}
this._x += randomNum(2) - 1;
this._y -= ThisSize / 30;
}
else if(_Y > -138)
{
this._alpha -= 5;
this._x += randomNum(2) - 1;
this._y -= ThisSize / 30;
}
else
{
ThisSize = randomNum(50) + 50;
this._xscale = ThisSize;
this._yscale = ThisSize;
this._x = randomNum(300) - 150;
this._y = 130;
this._alpha = 0;
}
}
ThisSize = randomNum(50) + 50;
this._xscale = ThisSize;
this._yscale = ThisSize;
this._x = randomNum(300) - 150;
this._y = 130;
this._alpha = 0;
this.onEnterFrame = function()
{
bubble();
};